<?php

namespace App\Http\Controllers\Common;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class CaptchaController extends Controller
{
    /*
     * 获取图形验证码
     * GET
     */
    public function getCaptcha(Request $request)
    {
        try
        {
            $src = captcha_src();
            return $this->response(1, '获取成功,', ['captcha' => $src]);
        }
        catch (\Exception $exception)
        {
            return $this->exceptionResponse($exception, __FUNCTION__);
        }
    }
}
